﻿using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
namespace Athena.Codec.Implementations
{
    using Message;
    public class JsonRpcMessageEncoder : IRpcMessageEncoder
    {
        public byte[] MessageEncoding(RpcTransportMessage rpcTransportMessage)
        {
            var messageJsonString = JsonConvert.SerializeObject(rpcTransportMessage);
            return Encoding.UTF8.GetBytes(messageJsonString);
        }
    }
}
